<?php

namespace IDock\Insurance\YAIC\Request;

use IDock\Insurance\YAIC\Response\EPolicyDownloadResponse;
use IDock\Visitor\EPolicyDownloadVisitor;

class EPolicyDownloadRequest extends AllYAICRequest
{
    protected $route = '';

    protected $response = EPolicyDownloadResponse::class;

    protected $urlTip = '电子保单预览和下载接口';

    public $transCode = 'B21';

    /**
     * @var  EPolicyDownloadVisitor $visitor
     */
    protected $visitor;

    public function generate(): array
    {
        return [
            'businessNo' => $this->visitor->policyNo,
            'documentType' => $this->visitor->argc['sign'] ? '02' : '01',
        ];
    }
}
